function [position,isterminal,direction] =NegXcrossing(~,S)
position = S(2);
if S(1) < 0
    isterminal = 1;
else
    isterminal = 0;
end
direction = 0;   % The zero can be approached from either direction